package com.wxxymaker.edu.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @AUTHOR soft
 * @DATE 2018/10/6 14:04
 * @DESCRIBE 任务完成条件
 */
@AllArgsConstructor
@Getter
public enum TaskGoal {
    END("学到最后"),
    TIME("学习时长");

    private String name;

    // 默认返回视频
    public static TaskGoal ordinalOf(Integer o) {
        for (TaskGoal value : TaskGoal.values()) {
            if (value.ordinal() == o) {
                return value;
            }
        }
        return END;
    }
}
